1. Field of the Invention
The present invention relates to bit rate control in video processing systems, and, in particular, to apparatuses and methods for controlling the bit rate for partitions or stripes of video pictures.
2. Description of the Related Art
Video processing systems employ bit rate control when encoding video signals, such as video pictures (also referred to as video frames or images). Such pictures are typically composed of an array of pixels, which are encoded (for example, by compression) to provide an encoded (or compressed) video signal or data stream. Each encoded picture has a given number of encoded bits, which corresponds to a particular bit rate. For example, for a series of pictures encoded 30 pictures per second, if each encoded picture has 20 kbits on average, then the average bit rate for the encoded bitstream is 30 pics/sec * 20 kbits/pic=600 kbits/sec.
In variable bit rate (VBR) encoders, the pictures encoded have more or less constant quality, but the number of bits generated per picture may have a large variance. In many applications, this is not acceptable, and thus constant bit rate (CBR) digital video encoders are frequently used. A CBR encoder attempts to maintain a specified constant bit rate on average, while maintaining a smoothly varying and uniform subjective picture quality. An optimal bit rate control technique will attempt to maintain the highest possible picture quality, given the constraints of a specified bit rate and decoder buffer size.
Bit rate control limits the average number of bits the CBR encoding system can produce, and the decoder buffer size limits the amount of variation in the instantaneous bit rate. In general, bit rate control calculates the target bit allocation, which involves estimating the number of bits available to encode the next picture.
Bit rate control is, therefore, employed to encode each subsequent picture in a series of pictures so that the encoded bitstream resulting from the encoding of a given current picture matches a target bit rate as closely as possible. In this manner, the quality of pictures is maximized by allocating as many bits per picture as possible, on average, while avoiding overflowing the transmission or processing bandwidth or the buffer of a decoder system receiving the encoded bits. A smaller number of encoded bits for a given picture corresponds to a lower average bit rate for the series of pictures being encoded, and vice-versa. Thus, if a target bit rate is lowered, it may be desirable to encode a given picture to produce a relatively smaller number of encoded bits. In accordance with a provided target bit rate, therefore, a given picture is allocated a target number of encoded bits into which it should be encoded, to achieve the target bit rate.
Various encoding-related parameters are typically adjusted in order to increase or decrease the number of encoded bits expected from encoding a given picture, in order to match the target bit rate provided for the picture. For example, during encoding of pictures, blocks of pixels which constitute the image are often transformed by a discrete cosine transform (DCT) to arrays of DCT coefficients. These coefficients may then be quantized, before being run-length encoded (RLE) and transmitted, for example. A higher quantization level provides, in general, a smaller number of encoded bits for a given block of DCT coefficients having a given complexity or energy level (and a correspondingly lower encoded bit rate), and vice-versa.
Thus, to match a given targeted bit rate as closely as possible, an estimate may be made of the picture's complexity. Using a known or estimated relation between an average complexity X, the quantization level Q, and resulting number of bits S for the resulting encoded bitstream, a Q level can be selected accordingly.
During processing, pictures are often broken up into a plurality of partitions, such as horizontal bands or stripes, for example to allow for parallel processing techniques to be utilized. Such systems are used, for example, in high-definition television (HDTV) systems. Each stripe is encoded and yields a certain number of encoded bits, which ideally add up to the target bits allocated to the picture as a whole. In such systems, there is a need to allocate the target bits among the stripes.